package com.mjk.common.ai.work.chat;


import com.mjk.common.ai.base.ThreadContext;
import com.mjk.common.ai.dto.KbStarInfoResp;
import com.mjk.common.ai.service.KnowledgeBaseStarService;
import com.mjk.common.core.jdbc.bean.BeePage;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Validated
@RequestMapping("/knowledge-base/star")
@RestController
public class KnowledgeBaseStarController {

    @Resource
    private KnowledgeBaseStarService knowledgeBaseStarService;

    @GetMapping("/mine")
    public BeePage<KbStarInfoResp> stars(int currentPage, int pageSize) {
        return knowledgeBaseStarService.listStarInfo(ThreadContext.getCurrentUser(), currentPage, pageSize);
    }
}
